package com.richard.design.principle.openclose;

/**
 * @author Richard·Wang
 */
public class Test {
    public static void main(String[] args) {
        ICourse iCourse = new JavaDiscountCourse(96,"Java从零到企业级电商开发",348d);
        JavaDiscountCourse javaCourse = (JavaDiscountCourse)iCourse;

        System.out.println("课程ID：" + javaCourse.getId() + "\n" +
                "课程名称：" + javaCourse.getName() + "\n" +
                "课程原价：" + javaCourse.getOriginPrice() + "元\n" +
                "课程折后价格:" + javaCourse.getPrice() + "元");

    }
}
